using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DateNightScenario
{
    /// <summary>
    /// Contains interaction logic for MainWindow.xaml.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.StyleCop.CSharp.NamingRules", "SA1300:ElementMustBeginWithUpperCaseLetter", Justification = "Event handlers may begin with lower-case letters.")]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate", Justification = "Encapsulation not yet taught.")]
    public partial class MainWindow : Window
    {
        /// <summary>
        /// Harry is a pursuer in a date night scenario.
        /// </summary>
        public Pursuer Harry;

        /// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        public MainWindow()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Creates a pursuer and related objects.
        /// </summary>
        /// <param name="sender">The object that initiated the event.</param>
        /// <param name="e">The event arguments for the event.</param>
        private void newHarryAndSallyDateButton_Click(object sender, RoutedEventArgs e)
        {
            // Create an instance of the Pursuer class.
            this.Harry = new Pursuer();

            // Set field values of Harry.
            this.Harry.Age = 42;
            this.Harry.Hometown = new City();
            this.Harry.MoneyBalance = 200.00m;
            this.Harry.Name = "Harry";
            this.Harry.RomanceLevel = 50.0;

            // Set field values of Harry's hometown.
            this.Harry.Hometown.CornerStore = new GasStation();
            this.Harry.Hometown.House1 = new House();
            this.Harry.Hometown.House2 = new House();
            this.Harry.Hometown.Name = "Chicago";
            this.Harry.Hometown.State = "IL";

            // Set field values of Harry's hometown's corner store.
            this.Harry.Hometown.CornerStore.Address = "105 Main Street";
            this.Harry.Hometown.CornerStore.GasPricePerGallon = 3.00m;
            this.Harry.Hometown.CornerStore.MoneyBalance = 586.00m;
            this.Harry.Hometown.CornerStore.Name = "Kwik Trip";

            // Set field values of one of Harry's hometown's houses.
            this.Harry.Hometown.House1.Address = "120 River Street";
            this.Harry.Hometown.House1.Name = "Harry's House";
            this.Harry.Hometown.House1.IsOccupied = true;

            // Set field values of another one of Harry's hometown's houses.
            this.Harry.Hometown.House2.Address = "412 Elm Street";
            this.Harry.Hometown.House2.Name = "Vacant House";
            this.Harry.Hometown.House2.IsOccupied = false;
        }
    }
}